import * as API from '@/api/common/index.js'


//------------------------------------------------订单接口------------------------------------------------


export async function getOrders(params) {              //获取订单管理页面接口
    return  await API.GET("/v1/flash/orders",params)
};
export async function getOrderByNo(params) {              //获取订单管理页面接口
    return  await API.GET("/v1/flash/orders/no/"+params)
};
export async function exprotOrders(params) {              //获取订单导出接口
    return  await API.GET("/v1/flash/orders/template/export",params,"blob")
};





//------------------------------------------------财务接口------------------------------------------------
export async function getFinance(params) {              //获取支付订单管理页面
    return  await API.GET("/v1/flash/order/pays",params)
};
export async function exprotFinance(params) {              //获取支付订单管理页面
    return  await API.GET("/v1/flash/order/pays/template/export",params,"blob")
};


//------------------------------------------------财务接口------------------------------------------------
export async function getReturnFinance(params) {              //获取退款订单处理页面
    return  await API.GET("/v1/flash/order/refunds",params)
};
export async function addReturnFinance(params) {              //获取退款订单处理页面
    return  await API.POST("/v1/flash/order/refunds",params)
};
export async function exprotReturnFinance(params) {              //获取退款订单导出接口
    return  await API.GET("/v1/flash/order/refunds/template/export",params,"blob")
};
export async function putApproval(params) {              //获取退款订单审核处理页面
    return  await API.PUT("/v1/flash/order/refunds/approve",params)
};
export async function GETReturnFinanceDetails(params) {              //获取退款订单查看页面
    return  await API.GET("/v1/flash/order/refunds/"+params)
};